<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../jquery.min.js"></script>
    <style>
        div {
            position: relative;
            display: none;
            width: 600px;
            height: 300px;
            background-image: url(./images/ad.jpg);
        }

        span {
            position: absolute;
            top: 0;
            right: 0;
            width: 40px;
            height: 20px;
            background-image: url(./images/h.jpg);
        }
    </style>
</head>

<body>
    <div>
        <span></span>
    </div>
    <script>
        //先下来，在上去，在淡出
        $('div').slideDown(1000).slideUp(1000).fadeIn(1000)
        //点击事件
        $('span').click(function() {
            $('div').fadeOut(1000)
        })
    </script>
</body>

</html>